﻿using System.Web;
using System.Web.Mvc;
using CNKI.TPI.Web.UI.Filters;
using CNKI.TPI.Web.Base;

namespace CNKI.TPI.Web.UI
{
    public class FilterConfig
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            //filters.Add(new SecurityActionFilter());
            filters.Add(new HandleErrorAttribute());
            if (ConfigHelper.IsSSOEnabled())
            {
                filters.Add(new SSOAuthAttribute());
            }
            else
            {
                filters.Add(new CustAuthAttribute());
            }
        }
    }
}